home *** CD-ROM | disk | FTP | other *** search
- TOP:
- ON ERROR GOTO HANDLER
- PRINT
- COLOR 15: PRINT "ZIPLOG.EXE ";
- COLOR 8: PRINT "- ";
- COLOR 12: PRINT "Version 1.0 ";
- COLOR 9: PRINT "Copyright (c) 1995,96 Ron Whitney (1:236/20.3) "
- COLOR 10
- PRINT
- IF COMMAND$="" THEN GOTO SYNTAX
- NOW$ = DATE$
- TODAY$ = LEFT$(NOW$, 2) + MID$(NOW$, 4, 2) + RIGHT$(NOW$, 2)
- NEWNAME$ = TODAY$ + RIGHT$(COMMAND$,4)
- ' Use the three lines below to COPY oldfile to newfile.
- ' PRINT "Copying ";COMMAND$;" as ";NEWNAME$
- ' ZIP$="COPY " + COMMAND$ + " " + NEWNAME$
- ' SHELL ZIP$
- ' Use the line below instead to REName oldfile to newfile.
- NAME COMMAND$ AS NEWNAME$ ' Does a REName
- PRINT "Zipping up the ";NEWNAME$;" file......"
- ZIP$ = "PKZIP -M " + TODAY$ + " " + NEWNAME$ + " > NUL"
- PRINT LEFT$(ZIP$,LEN(ZIP$)-6)
- SHELL ZIP$
- END
-
- SYNTAX:
- PRINT "ZIPLOG will change any file specified to mmddyy.LOG and"
- PRINT "will then invoke PKZIP to archive to mmddyy.ZIP."
- PRINT
- PRINT "Usage: ZIPLOG filename.ext where filename.ext is the file to archive."
- PRINT
- END
-
- HANDLER:
- SELECT CASE ERR
- CASE 53
- COLOR 15:PRINT "ERROR! - File not found."
- COLOR 10:PRINT "Verify that ";COMMAND$;" exists in the current directory."
- ' Insert other error traps in this CASE statement as needed.
- CASE ELSE
- COLOR 15:PRINT "ERROR! - Unknown error number ";ERR;" has occured."
- COLOR 10:PRINT "Report this error and conditions to Ron."
- END SELECT
- END
-
-